From: Richard M. Stallman Date: Sat, 17 Apr 1993 21:46:13 +0000 (+0000) Subject: (mail-do-fcc): Make a numeric time zone indicator X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~96509 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=5e6cb310a7b0da7f7331aa9c391e1d1e4dafa79b;p=emacs.git (mail-do-fcc): Make a numeric time zone indicator with current-time-zone--don't run `date'. --- diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 0d2cb929f81..e5a463ba746 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -370,14 +370,15 @@ the user from the mailer." fcc-list)) (delete-region (match-beginning 0) (progn (forward-line 1) (point)))) + (let* ((foo (current-time-zone)) + (offset (+ (car foo) (if (nth 1 foo) 60 0))) + (abs (abs offset))) + (setq timezone (format "%s%02d%02d" + (if (< offset 0) "-" "+") + (/ abs 60) + (% abs 60)))) (set-buffer tembuf) (erase-buffer) - (call-process "date" nil t nil) - (goto-char (point-min)) - (re-search-forward - "[0-9] \\([A-Za-z][-A-Za-z ]*[A-Za-z]\\)[0-9 ]*$") - (setq timezone (buffer-substring (match-beginning 1) (match-end 1))) - (erase-buffer) (insert "\nFrom " (user-login-name) " " (current-time-string) "\n") ;; Insert the time zone before the year.